package com.zxy.demo.guava;

import com.sun.istack.internal.Nullable;

/**
 * Person.
 * 
 * Created by zxybird on 17/2/9.
 */
public class Person {

  public int id;
  public int sex;
  public String name;
  public String nickname;
  public int level;
  public int age;

  public Person(int id, int sex, String name, String nickname, int level, int age) {
    this.id = id;
    this.sex = sex;
    this.name = name;
    this.nickname = nickname;
    this.level = level;
    this.age = age;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public int getSex() {
    return sex;
  }

  public void setSex(int sex) {
    this.sex = sex;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getNickname() {
    return nickname;
  }

  public void setNickname(String nickname) {
    this.nickname = nickname;
  }

  public int getLevel() {
    return level;
  }

  public void setLevel(int level) {
    this.level = level;
  }

  public @Nullable int getAge() {
    return age;
  }

  public void setAge(int age) {
    this.age = age;
  }

  @Override
  public String toString() {
    final StringBuilder sb = new StringBuilder("Person{");
    sb.append("id=").append(id);
    sb.append(", sex=").append(sex);
    sb.append(", name='").append(name).append('\'');
    sb.append(", nickname='").append(nickname).append('\'');
    sb.append(", level=").append(level);
    sb.append(", age=").append(age);
    sb.append('}');
    return sb.toString();
  }

}
